<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    let arr = [
        ['小明', '18'],
        ['小刚', '20']
    ]

    let newArr = arr.flatMap((item, index) => {
        item = item.filter((item, index) => {
            return index === 0;
        })
        return item;
    });
    console.log(newArr);
</script>
</body>
</html>
